#ifndef XMLFILEHELPER_H
#define XMLFILEHELPER_H

#ifndef XMLFILEHELPER_GLOBAL_H
#define XMLFILEHELPER_GLOBAL_H

#include <QtCore/qglobal.h>
#include <QObject>
#include <QXmlStreamWriter>
#include <QFile>
#include <QtXml/QtXml>
#include <QtXml/QDomDocument>

#if defined(XMLFILEHELPER_LIBRARY)
#  define XMLFILEHELPERSHARED_EXPORT Q_DECL_EXPORT
#else
#  define XMLFILEHELPERSHARED_EXPORT Q_DECL_IMPORT
#endif

#endif // XMLFILEHELPER_GLOBAL_H


class XMLFILEHELPERSHARED_EXPORT XmlFileHelper:public QObject
{
    Q_OBJECT
public:
    XmlFileHelper(QString path, QObject *parent=nullptr);
    ~XmlFileHelper();


public:
    QDomDocument OpenXmlFile(QString root_name);

    QDomNode FindChildNode(QDomNode root_node, const QString& node_name);

private:
    QString path;
};

#endif // XMLFILEHELPER_H
